package com.hq.mes.bussiness.inrecorddetail.domain;
import com.alibaba.fastjson.annotation.JSONField;
import com.hq.mes.bussiness.BussinessBaseEntity;
import com.hq.mes.bussiness.inrecord.domain.Inrecord;
import com.hq.mes.bussiness.product.domain.Product;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import me.zhengjie.base.BaseEntity;
import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;

import java.io.Serializable;
import java.util.Objects;
import java.util.Set;

/**
* @author wsq
* @date 2021-12-16
*/
@Entity
@Getter
@Setter
@Table(name = "hq_inrecord_detail")
@SQLDelete(sql = "update hq_inrecord_detail set is_del = 'true' where id = ?")
@Where(clause = " is_del <> 'true' or is_del is null ")
@org.hibernate.annotations.Table(appliesTo = "hq_inrecord_detail",comment="入库明细表")
public class InrecordDetail extends BussinessBaseEntity {

	@NotNull
@ManyToOne
@JoinColumn(name = "product_id", referencedColumnName = "id")
private Product 	product;


	
//@NotNull
//@ManyToOne
//private Inrecord 	inrecord;

    
    @Column(columnDefinition = "varchar(15) COMMENT '单位'")
    private String 	unit;

    @Column(columnDefinition = "int COMMENT '数量'")
    private Integer 	quantity;
    
    @Column(columnDefinition = "varchar(36) COMMENT '产品名称'")
    private String 	productName;
    
    @Column(columnDefinition = "varchar(36) COMMENT '产品编码'")
    private String 	productCode;
    
    @Column(columnDefinition = "varchar(255) COMMENT '产品规格'")
    private String 	productSpecification;
}